package com.wnxy.sdd.common.exception;

import com.wnxy.sdd.common.result.enums.ResultEnum;

public class BusinessException extends RuntimeException{

    // 保存传入的异常枚举对象
    private ResultEnum resultEnum;
    public ResultEnum getResultEnum() {
        return resultEnum;
    }

    public BusinessException() {
    }

    public BusinessException(String message) {
        super(message);
    }

    // 自己添加的构造函数重载
    public BusinessException(ResultEnum resultEnum) {
        super();
        this.resultEnum = resultEnum;
    }

    public BusinessException(String message, Throwable cause) {
        super(message, cause);
    }

    public BusinessException(Throwable cause) {
        super(cause);
    }
}
